package com.sixth.dao;

import com.sixth.entity.Goods;
import com.sixth.entity.Limit;
import org.apache.ibatis.annotations.Param;

import javax.annotation.Priority;
import java.util.List;

public interface GoodsDao {
    int deleteByPrimaryKey(@Param("goodsid") Integer goodsid,@Param("branchid") Integer branchid);

    int insert(Goods record);

    int insertSelective(Goods record);

    Goods selectByPrimaryKey(Integer goodsid);
    //修改商品信息
    int updateByPrimaryKeySelective(Goods record);

    int updateByPrimaryKey(Goods record);
    //往分店添加商品
    Integer addBranchGoods(@Param("branchid") Integer var1, @Param("goodsid") Integer var2);

    List<Goods> getGoods(@Param("goods") Goods var1, @Param("limit")Limit var2);

    Integer getCountGoods(@Param("goods") Goods var1);

    List<Goods> getAllGoods(@Param("goods") Goods goods, @Param("limit") Limit limit,@Param("branchid") Integer branchid,@Param("roleid") Integer roleid);

    Integer getGoodsCount(@Param("goods") Goods goods, @Param("branchid") Integer branchid,@Param("roleid") Integer roleid);

    List<Goods> getAllOutGoods(@Param("goods") Goods goods, @Param("limit") Limit limit, @Param("branchid") Integer branchid, @Param("roleid") Integer roleid, @Param("bid")Integer bid);

    Integer getOutGoodsCount(@Param("goods") Goods goods,@Param("branchid") Integer branchid, @Param("roleid") Integer roleid, @Param("bid") Integer bid);

    //根据商品id查询商品售价
    Goods getGoodsPrice(Integer goodsid);

    //查询名字是否重复
    List<Goods> getGoodsName(@Param("goodsname") String goodsname);

    List<Goods> getAllOutGoodsP(@Param("goods") Goods goods, @Param("limit") Limit limit, @Param("branchid") Integer branchid, @Param("roleid") Integer roleid, @Param("bid")Integer bid);

    Integer getOutGoodsCountP(@Param("goods") Goods goods, @Param("branchid") Integer branchid, @Param("roleid") Integer roleid, @Param("bid") Integer bid);
    //新增商品信息
    int addGoods(Goods record);

    List<Goods> getAllGoodsInformation();
}